#ifndef _TCS_STRUCT_
#define _TCS_STRUCT_

#include "msgQLib.h"
#include "platform.h"
#include "tss_typedef.h"

/**
*@breif TSP软件度量功能用于通信的结构体，含有命令码以及长度信息
*/
typedef struct MSG_CmdInfo_Mea{
	UINT32 code;
	UINT32 length;
	UINT32 priority;
}MSG_CmdInfo_Mea,*PMSG_CmdInfo_Mea;



/**
*@brief TSP层封装命令的结构体                                                                        
*/
typedef struct TrustReq {
	UINT32 code;
    UINT32 * param;
}TrustReq,*PTrustReq;

/**
*@brief TCS层用于调度的结构体                                                                        
*/
typedef struct MSG_Ask {	
    UINT32 priority;/**<命令优先级*/
    struct TrustReq* trustAskSt;/**<命令结构体*/
    MSG_Q_ID msgResponse;/**<结果接收队列ID*/
} MSG_Ask;

typedef struct MSG_Res_Cipher {
    UINT32 code; 
    TSS_RESULT res;
} MSG_Res_Cipher;

typedef struct MSG_Res {
    int tLength;
    struct measurement_cmd* trustResSt;
} MSG_Res;
/**
*	command  struct

*/


/*
typedef struct TrustReq {
    UINT32 code;
    UINT32 uuid;
    UINT32 crc;
    UINT8* param;
} TrustReq;
*/

typedef struct M_MSG_Ask {
    /* counts 在每次计算紧急程度之后将counts 加1，计算紧急程度时考虑counts*/
    /*todo 改名字成 等待轮数*/
    UINT32 counts;
    UINT32 priority;
    MSG_Ask msgAsk;
    struct M_MSG_Ask* next;
} M_MSG_Ask;

typedef struct M_MSG_Head {
    struct M_MSG_Ask* tail;
    struct M_MSG_Ask* next;
}M_MSG_Head;

#endif /* _TCS_STRUCT_ */
